<?
require_once("lib.php"); 
?>
<?
$mapgGUID = '';
if ($_GET['map']) {
	$mapGUID = $_GET['map'];
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Armap - Instituto Geográfico Nacional</title>
<!--<link tyle='text/css' href='http://layout.jquery-dev.net/lib/css/layout-default-latest.css' rel='stylesheet'>-->
<link type='text/css' href='<?=ELGG_MAPS_WEBPATH?>/css/cupertino/jquery-ui-1.8.11.custom.css' rel='stylesheet'>
<link type='text/css' href='http://fonts.googleapis.com/css?family=Cabin+Sketch:bold' rel='stylesheet'>
<link href='http://fonts.googleapis.com/css?family=Ubuntu:light,lightitalic,regular,italic,500,500italic,bold,bolditalic' rel='stylesheet' type='text/css'>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type='text/javascript'>
var ELGG_MAPS_MAPGUID = "<?=$mapGUID?>";
var ELGG_MAPS_WEBPATH = "<?=ELGG_MAPS_WEBPATH?>";
var ELGG_MAPS_URL = "<?=ELGG_MAPS_URL?>";
    $(document).ready(function () {
	//$('#Header').height(80);
	
	$('#ui-layout-center').css('height','100%');
	var resetLayout = function()
	{
	    //dejo un spare de 5, por las dudas
	    var usableHeight = $(window).height() - $('#Header').outerHeight() - 5;
	    $('#Main').outerHeight( usableHeight );
	}
	resetLayout();
	$(window).resize(resetLayout);
	elggMap.buildMap({mapGUID: ELGG_MAPS_MAPGUID});
    });
</script>
</head>
<body style="height:100%">
<div id="mapcontainer"></div>
</body>
<script type="text/javascript" src="<?=ELGG_MAPS_WEBPATH?>/vendors/jquery/jquery-ui-1.8.11.custom.min.js"></script>
<script type="text/javascript" src="<?=ELGG_MAPS_WEBPATH?>/vendors/jquery/jquery.form.js"></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/lib/OpenLayers-2.9/OpenLayers.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/lib/OpenLayers-2.9/lib/OpenLayers/Lang/es.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/OpenLayers.Feature.Vector.ext.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/OpenLayers.Layer.Vector.emKML.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.constants.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.events.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.ui.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.edit.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.session.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.remote.js'></script>
<script src='<?=ELGG_MAPS_WEBPATH?>/js/ElggMap.mapstuff.js'></script>
</html>
